# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        Young  
# Name:         demo6.09
# Description:
# Author:       $赵怡蕾
# Date:         2019/2/15
#-------------------------------------------------------------------------------

# 定义一个字典
dict = {"help":"帮助","bike":"自行车","geek":"极客","China":"中国"}
# 在控制台输出字典中所有的key-value对
print(dict.items())
# 通过for循环对dict中所有的值对进行迭代
for key_value in dict.items():
    print("key","=",key_value[0],"value","=",key_value[1])
# 判断（"bike","自行车"）是否在items方法的返回值中
print(("bike","自行车") in dict.items())
# 获取key-value对
dict_items = dict.items()
# 修改字典中的值
dict["bike"] = "自行车；摩托车；电动自行车；"
# 修改字典中的值后：dict_items中的值也会随着变化
print(dict_items)
# 输出字典中所有的key
print(dict.keys())
# 多字典中所有的key进行迭代
for key in dict.keys():
    print(key)